import React from 'react';
import {DatePicker, Form} from 'antd';
import moment from 'moment';
import http from '~/service/http';

const {RangePicker} = DatePicker;

function Test(props) {

    function testApi() {
        http.post('/api/portal/test', {param: 1}).then(res => {
            console.log(res);
        });
    }

    return (
        <div>
            <h2>test</h2>
            <Form name="testForm">
                <Form.Item label="label">
                    <RangePicker
                        defaultValue={[moment(), moment()]}
                        format="YYYY-MM-DD"
                    />
                </Form.Item>
            </Form>
            <hr />
            <button type="button" onClick={testApi}>test</button>
        </div>
    );
}

export default Test;

